package cn.dt70.service.impl;

import cn.dt70.dao.aqbAdmin.AqbAdminMapper;
import cn.dt70.pojo.AqbAdmin;
import cn.dt70.service.AqbAdminService;
import org.apache.log4j.Logger;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
@Service("aqbAdminService")
public class AqbAdminServiceImpl implements AqbAdminService {

    private static final Logger LOGGER = Logger.getLogger(AqbAdminServiceImpl.class);

    @Resource
    private AqbAdminMapper aqbAdminMapper;

    @Override
    public boolean add(AqbAdmin aqbAdmin) {
        int row=0;
        try {
            row=aqbAdminMapper.save(aqbAdmin);
            if(row !=1){
                LOGGER.debug("aqbAdminMapper.save 添加失败");
            }else{
                LOGGER.debug("aqbAdminMapper.save 添加成功");
                return true;
            }
        } catch (Exception e) {
            LOGGER.debug("aqbAdminMapper.save 添加异常"+e.getMessage());
        }
        return false;
    }
}
